package demo;

class A {

}
class B {
    @Override
    public String toString() {
        return "B{}";
    }
}
public class Test {
    public static void test(Object object) {
        System.out.println(object);
    }
    public static void main(String[] args) {
        test(new A());
        test(new B());
    }
}
